if [[ ! $? == 0 ]]; then
    logger "${action^} ${targetResource} on ${host:-local} with ${user:-$(whoami)} when ${executeProfile} ${sequence} failed" "error"
    exit 1
fi
logger "${action^} ${targetResource} on ${host:-local} with ${user:-$(whoami)} when ${executeProfile} ${sequence} succeed"